﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows" 
    
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">

    <Style TargetType="ListBoxItem" >
        <Setter Property="HorizontalContentAlignment" Value="Stretch"></Setter>

    </Style>
    <!--<ImageBrush x:Key="BackgroundImageBrush" ImageSource="/VocabManager;component/Resources/Images/Backgrounds/Blue2.jpg"></ImageBrush>-->
    
    <Style  TargetType="Button">
        <Setter Property="Background" Value="#FF1F3B53"/>
        <Setter Property="Foreground" Value="#FF000000"/>
        <Setter Property="Padding" Value="3"/>
        <Setter Property="BorderThickness" Value="1"/>
        <Setter Property="BorderBrush">
            <Setter.Value>
                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                    <GradientStop Color="#FFA3AEB9" Offset="0"/>
                    <GradientStop Color="#FF8399A9" Offset="0.375"/>
                    <GradientStop Color="#FF718597" Offset="0.375"/>
                    <GradientStop Color="#FF617584" Offset="1"/>
                </LinearGradientBrush>
            </Setter.Value>
        </Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="Button">
                    <Grid>
                        <vsm:VisualStateManager.VisualStateGroups>
                            <vsm:VisualStateGroup x:Name="CommonStates">
                                <vsm:VisualState x:Name="Normal"/>


                                <vsm:VisualState x:Name="MouseOver">
                                </vsm:VisualState>


                                <vsm:VisualState x:Name="Pressed">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames BeginTime="00:00:00"  
                                                                           Storyboard.TargetName="glow"  
                                                                           Storyboard.TargetProperty="(UIElement.Opacity)">
                                            <SplineDoubleKeyFrame KeyTime="00:00:00.1000000"  
                                                                      Value="1"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>


                                <vsm:VisualState x:Name="Disabled">
                                    <Storyboard>
                                        <DoubleAnimationUsingKeyFrames Storyboard.TargetName="DisabledVisualElement" Storyboard.TargetProperty="Opacity">
                                            <SplineDoubleKeyFrame KeyTime="0" Value=".55"/>
                                        </DoubleAnimationUsingKeyFrames>
                                    </Storyboard>
                                </vsm:VisualState>
                            </vsm:VisualStateGroup>
                            <vsm:VisualStateGroup x:Name="FocusStates">
                                <vsm:VisualState x:Name="Focused">
                                </vsm:VisualState>
                                <vsm:VisualState x:Name="Unfocused"/>
                            </vsm:VisualStateGroup>
                        </vsm:VisualStateManager.VisualStateGroups>


                        <Border  BorderBrush="#FFFFFFFF" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
                            <Border  x:Name="border" Background="#7F000000" BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="4,4,4,4">
                                <Grid >
                                    <Grid.RowDefinitions>
                                        <RowDefinition Height="0.507*"/>
                                        <RowDefinition Height="0.493*"/>
                                    </Grid.RowDefinitions>
                                    <Border    Opacity="0" HorizontalAlignment="Stretch" x:Name="glow" Width="Auto" Grid.RowSpan="2" CornerRadius="4,4,4,4">
                                        <Border.Background>
                                            <RadialGradientBrush>
                                                <RadialGradientBrush.RelativeTransform>
                                                    <TransformGroup>
                                                        <ScaleTransform ScaleX="1.702" ScaleY="2.243"/>
                                                        <SkewTransform AngleX="0" AngleY="0"/>
                                                        <RotateTransform Angle="0"/>
                                                        <TranslateTransform X="-0.368" Y="-0.152"/>
                                                    </TransformGroup>
                                                </RadialGradientBrush.RelativeTransform>
                                                <GradientStop Color="#B28DBDFF" Offset="0"/>
                                                <GradientStop Color="#008DBDFF" Offset="1"/>
                                            </RadialGradientBrush>
                                        </Border.Background>
                                    </Border>
                                    <Border Padding="{TemplateBinding Padding}" Grid.RowSpan="2">
                                    <ContentPresenter HorizontalAlignment="Center"  VerticalAlignment="Center" Width="Auto" />
                                    </Border>
                                    <Border HorizontalAlignment="Stretch" Margin="0,0,0,0" x:Name="shine" Width="Auto" CornerRadius="4,4,0,0">
                                        <Border.Background>
                                            <LinearGradientBrush EndPoint="0.494,0.889" StartPoint="0.494,0.028">
                                                <GradientStop Color="#99FFFFFF" Offset="0"/>
                                                <GradientStop Color="#33FFFFFF" Offset="1"/>
                                            </LinearGradientBrush>
                                        </Border.Background>
                                    </Border>
                                </Grid>
                            </Border>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

 
    <Style TargetType="ContentControl" x:Key="TitleStyle" >
        <Setter Property="Padding" Value="15"></Setter>
        <Setter Property="FontSize" Value="25"></Setter>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Border   Background="Transparent"  BorderBrush="#FF000000" BorderThickness="1,1,1,1" CornerRadius="8,8,0,0" >

                        <Grid >
                            <Grid.RowDefinitions>
                                <RowDefinition Height="0.507*"/>
                                <RowDefinition Height="0.493*"/>
                            </Grid.RowDefinitions>



                            <Border HorizontalAlignment="Stretch" Opacity="0.6" Margin="0,0,0,-1"  Width="Auto" CornerRadius="8,8,0,0"  Grid.RowSpan="2">
                                <Border.Background>
                                    <LinearGradientBrush EndPoint="0.494,0.889" StartPoint="0.494,0.028">
                                        <GradientStop Color="#99FFFFFF" Offset="0"/>
                                        <GradientStop Color="#33FFFFFF" Offset="1"/>
                                    </LinearGradientBrush>
                                </Border.Background>
                            </Border>
                            <Border Opacity=".8" Grid.RowSpan="2" CornerRadius="8,8,0,0" Margin="-1,0,1,0">
                                <Border.Background>
                                    <RadialGradientBrush>
                                        <RadialGradientBrush.RelativeTransform>
                                            <TransformGroup>
                                                <ScaleTransform ScaleX="1.702" ScaleY="2.243"/>
                                                <SkewTransform AngleX="0" AngleY="0"/>
                                                <RotateTransform Angle="0"/>
                                                <TranslateTransform X="-0.368" Y="-0.152"/>
                                            </TransformGroup>
                                        </RadialGradientBrush.RelativeTransform>
                                        <GradientStop Color="#B28DBDFF" Offset="0"/>
                                        <GradientStop Color="#008DBDFF" Offset="1"/>
                                    </RadialGradientBrush>
                                </Border.Background>
                            </Border>

                            <TextBlock HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
                                       VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                                       Name="_H" Opacity="1" Text="{TemplateBinding Content}"  Foreground="{TemplateBinding Foreground}" Grid.Column="0" Padding="{TemplateBinding Padding}"  ></TextBlock>

                        </Grid>
                    </Border>

                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="ContentControl" x:Key="Body" >
        <Setter Property="FontSize" Value="36"></Setter>
        <Setter Property="Foreground" Value="#FFE7FD1E"></Setter>
        <Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
        <Setter Property="VerticalContentAlignment" Value="Center"></Setter>


        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Grid>
                    <Border BorderBrush="Black" BorderThickness="1" Background="Gray" Opacity=".6" >
                        
                    </Border>
                        <Border Padding="{TemplateBinding Padding}">
                        <ContentPresenter  VerticalAlignment="{TemplateBinding  VerticalContentAlignment}" 
                            HorizontalAlignment="{TemplateBinding  HorizontalContentAlignment}"  Content="{TemplateBinding Content}" ></ContentPresenter>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
    <Style TargetType="ContentControl" x:Key="Body1" >
        <Setter Property="FontSize" Value="36"></Setter>
        <Setter Property="Foreground" Value="#FFE7FD1E"></Setter>
        <Setter Property="HorizontalContentAlignment" Value="Center"></Setter>
        <Setter Property="VerticalContentAlignment" Value="Center"></Setter>


        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="ContentControl">
                    <Grid>
                        <Border BorderBrush="Black" BorderThickness="1" >
                            <Border.Background>
                                <LinearGradientBrush EndPoint="0.5,1" StartPoint="0.5,0">
                                    <GradientStop Color="#FFC8ADAD" Offset="0.104"/>
                                    <GradientStop Color="White" Offset="1"/>
                                    <GradientStop Color="#FFDEB8B8" Offset="0.352"/>
                                    <GradientStop Color="#FFF5DEDE" Offset="0.809"/>
                                </LinearGradientBrush>
                            </Border.Background>

                        </Border>
                        <Border Padding="{TemplateBinding Padding}">
                            <ContentPresenter  VerticalAlignment="{TemplateBinding  VerticalContentAlignment}" 
                            HorizontalAlignment="{TemplateBinding  HorizontalContentAlignment}"  Content="{TemplateBinding Content}" ></ContentPresenter>
                        </Border>
                    </Grid>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>
</ResourceDictionary>